<template>
  <div class="about">
    <y-button title="吐司" type="primary" @click="toast"></y-button>
    <div style="marginTop:20px;">
      <div>{{msg}}</div>
      <y-input type="text" v-model="msg" autoSize="height" placeholder="请输入内容..."></y-input>
    </div>
  </div>
</template>


<script lang='ts'>
import { getCurrentInstance,reactive,toRefs } from "vue";
export default {
  setup() {
    const _this = getCurrentInstance()?.proxy as any;
    const state = reactive({
      msg : '111'
    })
    const toast = () => {
      _this.$toast.info({
        message: "这是一个提示",
        duraction: 2000,
      });
    };
    return {
      ...toRefs(state),
      toast,
    };
  },
};
</script>
